import { cmsRequest } from '@/request'

export const fetchExamPaperList = (payload: any) => {
  return cmsRequest.post('/plant/examPaper/query', payload)
}

export const fetchExamPaperGenerate = (payload: any) => {
  return cmsRequest.post('/plant/examPaper/generate', payload)
}

export const fetchExamPaperDel = (id: number) => {
  return cmsRequest.delete(`/plant/examPaper/${id}`)
}

export const fetchExamPaperResult = (payload: any) => {
  return cmsRequest.post('/plant/examPaperResult/getExamResultDetail', payload)
}

export const fetchExamPaperResultExport = (payload: any) => {
  return cmsRequest.post('/plant/examPaperResult/exportExamResultDetail', payload, { responseType: 'blob' })
}